//
// Created by A4-28 on 2020/10/14.
//
#include <math.h>

namespace WF {

    static const float DegreeToRadian_2 = M_PI / 180.0f;
    static const float RadianToDegree_2 = 1.0f / DegreeToRadian_2;

    //角度转弧度
    static const float DegreeToRadian = M_PI / 360.0f;
    //弧度转角度
    static const float RadianToDegree = 1.0f / DegreeToRadian;
    /**
     * 弧度转角度
     * @param radian 角度
     * @return 弧度
     */
    static float RadianTDegree(float radian) { return radian * RadianToDegree; }

    /**
     * 角度转弧度
     * @param degree 弧度
     * @return 角度
     */
    static float DegreeTRadian(float degree) { return degree * DegreeToRadian; }
}
